home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / comm / thor12.zip / FSEPGPSC.LHA / FSEPGPScripts / FSEScriptOut < prev    next >
Text File  |  1993-12-16  |  1KB  |  50 lines

  1. ; $VER: FSEScriptOut V1.3 (16.12.93) PGP support by Christian Sandberg
  2. .key Filename/a,width/a
  3. .bra {
  4. .ket }
  5.  
  6. failat 99
  7.  
  8. set Msgfile `list "{Filename}" lformat="%s"`
  9.  
  10. if exists ENV:FSEPGP.$Msgfile
  11.      search "{filename}" "-=-=-=-=-=-DO NOT PGPCRYPT!-=-=-=-=-=-"
  12.      if WARN
  13.           skip crypt
  14.           endif
  15.      grep >"t:$Msgfile" -v "PGPCRYPT!" "{filename}"
  16.      copy "t:$Msgfile" "{filename}"
  17.      unsetenv FSEPGP.$Msgfile
  18.      delete "t:$Msgfile"
  19.      skip quit
  20.      endif
  21.  
  22. search "{filename}" "-=-=-=-=-=-    PGPCRYPT!   -=-=-=-=-=-"
  23. if not WARN
  24.      skip crypt
  25.      endif
  26.  
  27. skip quit
  28.  
  29. lab crypt
  30.  
  31. if not exists ENV:FSEPGP.$Msgfile   ; Denne vil *ikke* virke med $FSEPGP.$Msgfile !! :-(
  32.       grep >"t:$Msgfile" -v "PGPCRYPT!" "{filename}"
  33.       copy "t:$Msgfile" "{filename}"
  34.       endif
  35. if not exists ENV:PGPPASS
  36.      setenv PGPPASS "`ESR "" "Enter PGP password:"`"
  37.      endif
  38. path $PGPPATH add
  39. pgp >>"t:out.$Msgfile" -o "t:$Msgfile" -eas "{filename}" "`ESR "" "Who is the PGP message for?"`"
  40. if WARN
  41.      type >"CON:0/10//200/PGP Error Msg/CLOSE/WAIT/ScreenTHOR" "t:out.$Msgfile"
  42.      copy "{filename}" "t:$Msgfile.asc"
  43.      endif
  44. copy "t:$Msgfile.asc" "{filename}"
  45. delete "t:$Msgfile" "t:$Msgfile.asc" "t:out.$Msgfile"
  46. unsetenv FSEPGP.$Msgfile
  47. unset Msgfile
  48.  
  49. lab quit
  50.